package cn.hj.domain.strategy.service.Armory;

import cn.hj.domain.strategy.model.valobj.StrategyAwardStockKeyVO;

import java.util.Date;

/*
 *抽奖策略调度
 * */
public interface IStrategyDispatch {

    /*
     * 获取抽奖策略装配的随即结果
     * */
    Integer getRandomAwardId(Long strategyId);

    /**
     * @param strategyId      策略ID
     * @param ruleWeightValue 权重值
     * @return
     */
    Integer getRandomAwardId(Long strategyId, String ruleWeightValue);


    /**
     * 根据策略ID和奖品ID，扣减奖品缓存库存
     *
     * @param strategyId  策略ID
     * @param awardId     奖品ID
     * @param endDateTime 扣减库存时间
     * @return 扣减结果
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);
}
